import request from '@/utils/request'

// 查询社团讨论区列表
export function listBoards(query) {
  return request({
    url: '/system/boards/list',
    method: 'get',
    params: query
  })
}

// 查询社团讨论区详细
export function getBoards(boardId) {
  return request({
    url: '/system/boards/' + boardId,
    method: 'get'
  })
}

// 新增社团讨论区
export function addBoards(data) {
  return request({
    url: '/system/boards',
    method: 'post',
    data: data
  })
}

// 修改社团讨论区
export function updateBoards(data) {
  return request({
    url: '/system/boards',
    method: 'put',
    data: data
  })
}

// 删除社团讨论区
export function delBoards(boardId) {
  return request({
    url: '/system/boards/' + boardId,
    method: 'delete'
  })
}
